<?php

class HomeController extends Controller {
	public function actionIndex () {
		$model = new Threads;
		$criteria = new CDbCriteria;
		$criteria->condition = 'active=:active';
		$criteria->params = array(':active'=>'1');
		$criteria->order = 'id desc';
		$this->render('index', array('model'=>$model->findAll($criteria)));
	}
}